import {
  request
} from '../utils/http';
import common from '../utils/common';

// 我的
const getMyData = () => request({data: {compId: common.getCompId()}, loading: false}, 'app/compAndCustomer');

// 套餐列表
const getAllVips =  (params) => request(params, 'app/listMeal');

// 上传营业执照
const upload  = (params) => request(params, 'app/uploadUrl');

// 修改企业信息
const updateCompInfo  = (params) => request(params, 'app/updateComp');

// 修改密码
const editPassword  = (params) => request(params, 'app/updatePwd');

// 修改手机号码
const editPhone = (params) => request(params, 'app/updatePhone');

// 招聘记录
const getRecruitments = (params) => request(params, 'app/listCompActiveTime');

// 企业购买的套餐
const getMeal = () => request({data: {compId: common.getCompId()}, loading: false}, 'app/getMeal');

// 余额明细
const getListPay = (params) => request(params, 'app/listPay');

// 人才点明细
const getTalentLogs = (params) => request(params, 'app/getTalentsNumberDetail');

// 邀约点明细
const getlistJdPay = (params) => request(params, 'app/listJdPay');

// 充值
const payMoney = (params) => request(params, 'app/payMoney');

// 购买套餐
const purchaseMeal = (params) => request(params, 'app/purchaseMeal');

// 单个权益获取
const getMealOne = (params) => request(params, 'app/getMealOne');

// 单个权益购买
const purchase = (params) => request(params, 'app/purchase');

// 计算单个权益价格
const countPrice = (params) => request(params, 'app/countPrice');

export default {
  upload,
  getAllVips,
  getMyData,
  updateCompInfo,
  editPassword,
  editPhone,
  getRecruitments,
  getMeal,
  getListPay,
  getTalentLogs,
  getlistJdPay,
  payMoney,
  purchaseMeal,
  getMealOne,
  countPrice,
  purchase
}
